import type { AxiosResponse,InternalAxiosRequestConfig,AxiosError } from "axios"
import { Trestem } from "@/models/restem"

export interface HRequestInterceptors<T = AxiosResponse> {
    requestInterceptor?: ( config:InternalAxiosRequestConfig ) => InternalAxiosRequestConfig,
    requestInterceptorCatch?: (error:AxiosError) => AxiosError,
    responseInterceptor?: (config:T) => T,
    responseInterceptorCatch?: (error: AxiosError<Trestem,any>) => AxiosError
}

export interface HRequestConfig<T = AxiosResponse> extends InternalAxiosRequestConfig {
    interceptors?: HRequestInterceptors<T>,
}